

require('./common');

exports.load = function(req, res){
	var strSQL = "SELECT * FROM tbl_purchase_request ";
	var onClick ='';
	
	conn.query(strSQL, function(err, results, fields){
		if(err) throw err;
		var output = '<table border=0 cellpadding=2 cellspacing=0 width="100%">';
		var users=["Stephen Cury","Harrison Barnes", "Kent Bazemore", "Andris Biedrins", "Andrew Bogut", "Festus Ezeli", "Draymond Green"];
		
		for (var index in results) {
			output += '<tr class="rightNavRow">';
			output += '<td width="20px" style="border-bottom:1px Solid #d8dfea"><img src="/images/' + results[index].ID +'.jpg" width="30px" height="40px"></td>';
			output += '<td style="border-bottom:1px Solid #d8dfea"><b>'+ users[index] + '</b> submitted a request with Tracking Number: <a href="/form/23/' + results[index].ID + '" class="editDelete" style="color:#444">' + results[index].TrackNo + '</a></td>';
			output += '</tr>';
		}
		output += '</table>';
		
		res.send(output)
	});
}


